Skip to content

Conversation

@miroiu
Copy link
Owner

@miroiu miroiu commented Jun 7, 2025

📝 Description of the Change

  • Added a custom keyboard navigation system to Nodify
  • Improved keyboard navigation in all example applications and customized the focus visual
  • Added new settings to the playground app: ConnectionStrokeThickness, ConnectionOutlineThickness and ConnectionFocusVisualPadding

See the change log for more information.

Keybindings:

  • Ctrl+Tab to escape the current focus trap (focus parent element)
  • Tab or Shift-Tab on a node focus its contents (connectors) - default WPF behavior
  • Tab or Shift-Tab on the editor to focus the next element - default WPF behavior
  • arrow keys for directional navigation between nodes (or connections)
  • Ctrl+arrow keys for moving the selected nodes
  • Space+arrow keys for panning the editor viewport
  • Space or Enter to toggle the selected state of the focused node (or connection)
  • Ctrl+Space on a selected grouping node to toggle the selection state of the child nodes
  • Escape to deselect all items on the active keyboard navigation layer
  • Ctrl+] to activate the next keyboard navigation layer
  • Ctrl+[ to activate the previous keyboard navigation layer
  • arrow keys to pan the minimap
  • Ctrl+Plus or Ctrl+Minus to zoom in/out in the minimap/editor
  • Home to reset the viewport in minimap/editor

keyboard

Related: #89
Closes: #194, #195, #197, #198

🐛 Possible Drawbacks

Increased code complexity.

@miroiu miroiu marked this pull request as ready for review June 17, 2025 19:00
@miroiu miroiu requested a review from Copilot June 17, 2025 20:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces extensive improvements to keyboard navigation and focus visuals across Nodify’s various applications, including new settings for connection visuals and a custom keyboard navigation layer system. Key changes include modifications to event handlers for keyboard focus updates, additions of new dependency properties and settings for connection styling, and the integration of focus visual styles in XAML resource dictionaries.

Reviewed Changes

Copilot reviewed 67 out of 67 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Examples/Nodify.Shared/Controls/EditableTextBlock.cs Unsubscribing from TextBox events is added before re-attaching a new template.
Examples/Nodify.Shapes/MainWindow.xaml.cs A keyboard focus handler is added that updates the window title with the new focus element.
Examples/Nodify.Shapes/Canvas/CanvasView.xaml XAML adjustments to set Focusable to False and add FocusVisualPadding to improve navigation visuals.
Examples/Nodify.Shapes/App.xaml(.cs) Gesture mappings updated to support key based interactions with the editor viewport.
Examples/Nodify.Playground/* Enhancements include added focus visuals, new settings for connection visuals, and a keyboard navigation layer property in the view model.
Examples/Nodify.Calculator/* Modifications include focus restoration in the operations menu, added context menu command bindings, and updated resource dictionaries for focus visuals.
CHANGELOG.md The changelog is updated with a detailed list of new features and API changes for keyboard navigation and viewport operations.
Comments suppressed due to low confidence (3)

Examples/Nodify.Shapes/MainWindow.xaml.cs:23

  • Consider removing or updating this debug code that sets the window title with the focused element when in production.
            Title = e.NewFocus.ToString();

Examples/Nodify.Playground/MainWindow.xaml.cs:67

  • This focus change handler updates the window title for debugging purposes; ensure this behavior is intended for production or remove it before release.
            Title = e.NewFocus.ToString();

Examples/Nodify.Calculator/MainWindow.xaml.cs:23

  • The focus handler updates the title with the new focus element which appears to be for debugging; consider removing or refactoring this for production use.
            Title = e.NewFocus.ToString();

@miroiu miroiu merged commit e273b95 into master Jun 18, 2025
3 checks passed
@miroiu miroiu deleted the feature/keyboard-focus branch June 18, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Improve keyboard navigation

2 participants